#include "Planets.h"
#include <string>
#include <vector>

class Zone;

class WeakPoint : public Entity
{
public:
	WeakPoint(Planets*owner = nullptr);
	~WeakPoint();

	int GetType() const { return ENT_WEAKPOINT; }
	void Render();
	void Update(float elapsedTime) override;
	void HandleCollision(const IEntity* other);
	
	//Accessors
	bool GetDamaged() const { return damaged; }
	bool GetArmored() const { return armored; }
	bool GetArmorDamage() const { return armorDamaged; }
	bool GetSpiked() const { return spiked; }
	bool GetSpikeDamage() const { return spikeDamaged; }
	bool GetTentacles() const { return tentacles; }
	bool GetMancerSpawn() const { return mancerSpawn; }
	Planets* GetCurrentPlanet() const { return currPlanet; }
	//Mutators
	void SetDamage(bool d) { damaged = true; }
	void SetArmored(bool a) { armored = true; }
	void SetArmorDamage(bool ad) { armorDamaged = true; }
	void SetSpiked(bool s) { spiked = s; }
	void SetSpikeDamage(bool sd) { spikeDamaged = sd; }
	void SetTentacles(bool t) { tentacles = t; }
	void SetMancerSpawn(bool ms) { mancerSpawn = ms; }
	void SetCurrentPlanet(Planets*o){ currPlanet = o; }
private:
	bool damaged = false;
	bool armored = false;
	bool armorDamaged = false;
	bool spiked = false;
	bool spikeDamaged = false;
	bool tentacles = false;
	bool mancerSpawn = false;
	Planets*currPlanet = nullptr;
	SGD::HTexture eye = SGD::INVALID_HANDLE;
	SGD::HTexture armor = SGD::INVALID_HANDLE;
	SGD::HTexture spike = SGD::INVALID_HANDLE;
	SGD::HTexture broken = SGD::INVALID_HANDLE;
};

class BossPlanets : public Planets
{
public:
	BossPlanets();
	virtual ~BossPlanets();
	void Render(void);
	void Update(float elapsedTime) override;
	void SetWeakPoints();
	void SetWeakPoint(WeakPoint*helper);
	int GetType() const { return ENT_BOSS; }
	std::string imagepath;
	SGD::HTexture PlanetImage;

	void SetOwner(Zone* o);

	//Accessors
	std::vector<WeakPoint*> GetWeakPoints() { return weakPoints; }
	Zone* GetOwner() const { return owner; }
	bool GetAlive() const { return alive; }
private:
	std::vector<WeakPoint*> weakPoints;
	bool alive = true;

	Zone* owner = nullptr;
};

